package com.rzcode.coinex.kernel.common.mybatis.utils;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.springframework.util.CollectionUtils;

import java.util.Collection;

public class StrUtil {
    /**
     * 判断是否为空，包含字符串
     *
     * @param value 值
     * @return 是否为空
     */
    public static boolean isNullBlank(Object value) {
        return value == null || (value instanceof String && StringUtils.isEmpty(String.valueOf(value)))
                || (value instanceof Collection && CollectionUtils.isEmpty((Collection) value));
    }
}
